package edu.cueb.wmis.mapper;

import edu.cueb.wmis.pojo.House;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author liuzizhuo
 * @since 2021-04-19
 */
public interface HouseMapper extends BaseMapper<House> {

    @Select("SELECT h.`name` FROM tb_shelf s ,tb_house h ,tb_house_shelf hs WHERE hs.`hid` = h.`id` AND hs.`sid` = s.`id` AND s.`id` = #{shelfId}")
    String getHouseNameByShelfId(Integer shelfId);
}
